import org.apache.spark.streaming.{Seconds, StreamingContext}
import org.apache.spark.{SparkConf, SparkContext}

object TextFileStream {
  def main(args: Array[String]): Unit = {
    val batchInterval = 5
    val conf = new SparkConf().setMaster("local[*]").setAppName("TextfileStream")
    val sc = new SparkContext(conf);
    val ssc = new StreamingContext(sc, Seconds(batchInterval));

    val texts = ssc.socketTextStream("localhost", 5784);
  }
}
